/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  @endpointMap = {
    ap-northeast-2-pop = 'clickhouse.aliyuncs.com',
    ap-southeast-1 = 'clickhouse.aliyuncs.com',
    cn-beijing = 'clickhouse.aliyuncs.com',
    cn-beijing-finance-1 = 'clickhouse.aliyuncs.com',
    cn-beijing-finance-pop = 'clickhouse.aliyuncs.com',
    cn-beijing-gov-1 = 'clickhouse.aliyuncs.com',
    cn-beijing-nu16-b01 = 'clickhouse.aliyuncs.com',
    cn-edge-1 = 'clickhouse.aliyuncs.com',
    cn-fujian = 'clickhouse.aliyuncs.com',
    cn-haidian-cm12-c01 = 'clickhouse.aliyuncs.com',
    cn-hangzhou = 'clickhouse.aliyuncs.com',
    cn-hangzhou-bj-b01 = 'clickhouse.aliyuncs.com',
    cn-hangzhou-finance = 'clickhouse.aliyuncs.com',
    cn-hangzhou-internal-prod-1 = 'clickhouse.aliyuncs.com',
    cn-hangzhou-internal-test-1 = 'clickhouse.aliyuncs.com',
    cn-hangzhou-internal-test-2 = 'clickhouse.aliyuncs.com',
    cn-hangzhou-internal-test-3 = 'clickhouse.aliyuncs.com',
    cn-hangzhou-test-306 = 'clickhouse.aliyuncs.com',
    cn-hongkong = 'clickhouse.aliyuncs.com',
    cn-hongkong-finance-pop = 'clickhouse.aliyuncs.com',
    cn-north-2-gov-1 = 'clickhouse.aliyuncs.com',
    cn-qingdao = 'clickhouse.aliyuncs.com',
    cn-qingdao-nebula = 'clickhouse.aliyuncs.com',
    cn-shanghai = 'clickhouse.aliyuncs.com',
    cn-shanghai-et15-b01 = 'clickhouse.aliyuncs.com',
    cn-shanghai-et2-b01 = 'clickhouse.aliyuncs.com',
    cn-shanghai-finance-1 = 'clickhouse.aliyuncs.com',
    cn-shanghai-inner = 'clickhouse.aliyuncs.com',
    cn-shanghai-internal-test-1 = 'clickhouse.aliyuncs.com',
    cn-shenzhen = 'clickhouse.aliyuncs.com',
    cn-shenzhen-finance-1 = 'clickhouse.aliyuncs.com',
    cn-shenzhen-inner = 'clickhouse.aliyuncs.com',
    cn-shenzhen-st4-d01 = 'clickhouse.aliyuncs.com',
    cn-shenzhen-su18-b01 = 'clickhouse.aliyuncs.com',
    cn-wuhan = 'clickhouse.aliyuncs.com',
    cn-yushanfang = 'clickhouse.aliyuncs.com',
    cn-zhangbei-na61-b01 = 'clickhouse.aliyuncs.com',
    cn-zhangjiakou-na62-a01 = 'clickhouse.aliyuncs.com',
    cn-zhengzhou-nebula-1 = 'clickhouse.aliyuncs.com',
    eu-west-1-oxs = 'clickhouse.aliyuncs.com',
    me-east-1 = 'clickhouse.aliyuncs.com',
    rus-west-1-pop = 'clickhouse.aliyuncs.com',
    us-east-1 = 'clickhouse.aliyuncs.com',
    us-west-1 = 'clickhouse.aliyuncs.com',
  };

  checkConfig(config);
  @endpoint = getEndpoint('clickhouse', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AllocateVirtualWareHousePublicConnectionRequest {
  DBClusterId?: string(name='DBClusterId', example='cc-bp108z124a8o7****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  virtualWareHouseId?: string(name='VirtualWareHouseId', description='This parameter is required.', example='vw-uf6a499c0m3w5****'),
}

model AllocateVirtualWareHousePublicConnectionResponseBody = {
  requestId?: string(name='RequestId', example='F5178C10-1407-4987-9133-DE4DC9119F75'),
}

model AllocateVirtualWareHousePublicConnectionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AllocateVirtualWareHousePublicConnectionResponseBody(name='body'),
}

/**
 * @summary 申请计算组公网SLB
 *
 * @param request AllocateVirtualWareHousePublicConnectionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AllocateVirtualWareHousePublicConnectionResponse
 */
async function allocateVirtualWareHousePublicConnectionWithOptions(request: AllocateVirtualWareHousePublicConnectionRequest, runtime: Util.RuntimeOptions): AllocateVirtualWareHousePublicConnectionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.virtualWareHouseId)) {
    query['VirtualWareHouseId'] = request.virtualWareHouseId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AllocateVirtualWareHousePublicConnection',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 申请计算组公网SLB
 *
 * @param request AllocateVirtualWareHousePublicConnectionRequest
 * @return AllocateVirtualWareHousePublicConnectionResponse
 */
async function allocateVirtualWareHousePublicConnection(request: AllocateVirtualWareHousePublicConnectionRequest): AllocateVirtualWareHousePublicConnectionResponse {
  var runtime = new Util.RuntimeOptions{};
  return allocateVirtualWareHousePublicConnectionWithOptions(request, runtime);
}

model CheckCreateClusterRequest {
  autoRenew?: boolean(name='AutoRenew', example='true'),
  DBClusterDescription?: string(name='DBClusterDescription', example='test'),
  payType?: string(name='PayType', description='This parameter is required.', example='Postpaid'),
  period?: string(name='Period', example='Month'),
  regionId?: string(name='RegionId', description='This parameter is required.', example='cn-hangzhou'),
  usedTime?: string(name='UsedTime', example='1'),
  virtualWareHouseCacheStorage?: int32(name='VirtualWareHouseCacheStorage', description='This parameter is required.', example='200'),
  virtualWareHouseClass?: string(name='VirtualWareHouseClass', description='This parameter is required.', example='n1.xlarge'),
  virtualWareHouseDescription?: string(name='VirtualWareHouseDescription', example='test'),
  vpcId?: string(name='VpcId', description='VPC ID。

This parameter is required.', example='vpc-uf6xmupdn7v6ui9f7****'),
  vswitchId?: string(name='VswitchId', description='This parameter is required.', example='vsw-uf632qye9oqt4x4sr5****'),
  zoneId?: string(name='ZoneId', description='This parameter is required.', example='cn-hangzhou-h'),
}

model CheckCreateClusterResponseBody = {
  data?: {
    expectedDBClusterStatus?: string(name='ExpectedDBClusterStatus', example='Creating'),
    expectedOrderFinishSeconds?: long(name='ExpectedOrderFinishSeconds', example='60'),
    expectedTargetVirtualWareHouseStatus?: string(name='ExpectedTargetVirtualWareHouseStatus', example='Creating'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='9A23C87D-87DF-4DA0-A50E-CB13F4F7923D'),
}

model CheckCreateClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckCreateClusterResponseBody(name='body'),
}

/**
 * @summary 创建实例检查
 *
 * @param request CheckCreateClusterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckCreateClusterResponse
 */
async function checkCreateClusterWithOptions(request: CheckCreateClusterRequest, runtime: Util.RuntimeOptions): CheckCreateClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.autoRenew)) {
    query['AutoRenew'] = request.autoRenew;
  }
  if (!Util.isUnset(request.DBClusterDescription)) {
    query['DBClusterDescription'] = request.DBClusterDescription;
  }
  if (!Util.isUnset(request.payType)) {
    query['PayType'] = request.payType;
  }
  if (!Util.isUnset(request.period)) {
    query['Period'] = request.period;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.usedTime)) {
    query['UsedTime'] = request.usedTime;
  }
  if (!Util.isUnset(request.virtualWareHouseCacheStorage)) {
    query['VirtualWareHouseCacheStorage'] = request.virtualWareHouseCacheStorage;
  }
  if (!Util.isUnset(request.virtualWareHouseClass)) {
    query['VirtualWareHouseClass'] = request.virtualWareHouseClass;
  }
  if (!Util.isUnset(request.virtualWareHouseDescription)) {
    query['VirtualWareHouseDescription'] = request.virtualWareHouseDescription;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }
  if (!Util.isUnset(request.vswitchId)) {
    query['VswitchId'] = request.vswitchId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CheckCreateCluster',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建实例检查
 *
 * @param request CheckCreateClusterRequest
 * @return CheckCreateClusterResponse
 */
async function checkCreateCluster(request: CheckCreateClusterRequest): CheckCreateClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkCreateClusterWithOptions(request, runtime);
}

model CheckCreateVirtualWareHouseRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.', example='cc-bp108z124a8o7****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  virtualWareHouseCacheStorage?: int32(name='VirtualWareHouseCacheStorage', description='This parameter is required.', example='200'),
  virtualWareHouseClass?: string(name='VirtualWareHouseClass', description='This parameter is required.', example='n1.xlarge'),
  virtualWareHouseDescription?: string(name='VirtualWareHouseDescription', example='test'),
  vswitchId?: string(name='VswitchId', example='vsw-uf632qye9oqt4x4sr****'),
  zoneId?: string(name='ZoneId', example='cn-hangzhou-h'),
}

model CheckCreateVirtualWareHouseResponseBody = {
  data?: {
    expectedDBClusterStatus?: string(name='ExpectedDBClusterStatus', example='ResourceChanging'),
    expectedOrderFinishSeconds?: long(name='ExpectedOrderFinishSeconds', example='60'),
    expectedTargetVirtualWareHouseStatus?: string(name='ExpectedTargetVirtualWareHouseStatus', example='Creating'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='9A23C87D-87DF-4DA0-A50E-CB13F4F7923D'),
}

model CheckCreateVirtualWareHouseResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckCreateVirtualWareHouseResponseBody(name='body'),
}

/**
 * @summary 创建计算组检查
 *
 * @param request CheckCreateVirtualWareHouseRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckCreateVirtualWareHouseResponse
 */
async function checkCreateVirtualWareHouseWithOptions(request: CheckCreateVirtualWareHouseRequest, runtime: Util.RuntimeOptions): CheckCreateVirtualWareHouseResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.virtualWareHouseCacheStorage)) {
    query['VirtualWareHouseCacheStorage'] = request.virtualWareHouseCacheStorage;
  }
  if (!Util.isUnset(request.virtualWareHouseClass)) {
    query['VirtualWareHouseClass'] = request.virtualWareHouseClass;
  }
  if (!Util.isUnset(request.virtualWareHouseDescription)) {
    query['VirtualWareHouseDescription'] = request.virtualWareHouseDescription;
  }
  if (!Util.isUnset(request.vswitchId)) {
    query['VswitchId'] = request.vswitchId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CheckCreateVirtualWareHouse',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建计算组检查
 *
 * @param request CheckCreateVirtualWareHouseRequest
 * @return CheckCreateVirtualWareHouseResponse
 */
async function checkCreateVirtualWareHouse(request: CheckCreateVirtualWareHouseRequest): CheckCreateVirtualWareHouseResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkCreateVirtualWareHouseWithOptions(request, runtime);
}

model CheckDeleteVirtualWareHouseRequest {
  DBClusterId?: string(name='DBClusterId', example='cc-bp1qx68m06981****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  virtualWareHouseId?: string(name='VirtualWareHouseId', description='This parameter is required.', example='vw-uf6a499c0m3w5****'),
}

model CheckDeleteVirtualWareHouseResponseBody = {
  data?: {
    expectedDBClusterStatus?: string(name='ExpectedDBClusterStatus', example='ResourceChanging'),
    expectedOrderFinishSeconds?: long(name='ExpectedOrderFinishSeconds', example='60'),
    expectedTargetVirtualWareHouseStatus?: string(name='ExpectedTargetVirtualWareHouseStatus', example='Deleting'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='9A23C87D-87DF-4DA0-A50E-CB13F4F7923D'),
}

model CheckDeleteVirtualWareHouseResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckDeleteVirtualWareHouseResponseBody(name='body'),
}

/**
 * @summary 删除计算组检查
 *
 * @param request CheckDeleteVirtualWareHouseRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckDeleteVirtualWareHouseResponse
 */
async function checkDeleteVirtualWareHouseWithOptions(request: CheckDeleteVirtualWareHouseRequest, runtime: Util.RuntimeOptions): CheckDeleteVirtualWareHouseResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.virtualWareHouseId)) {
    query['VirtualWareHouseId'] = request.virtualWareHouseId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CheckDeleteVirtualWareHouse',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除计算组检查
 *
 * @param request CheckDeleteVirtualWareHouseRequest
 * @return CheckDeleteVirtualWareHouseResponse
 */
async function checkDeleteVirtualWareHouse(request: CheckDeleteVirtualWareHouseRequest): CheckDeleteVirtualWareHouseResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkDeleteVirtualWareHouseWithOptions(request, runtime);
}

model CheckModifyVirtualWareHouseResourceRequest {
  DBClusterId?: string(name='DBClusterId', example='cc-bp108z124a8o7****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  virtualWareHouseCacheStorage?: int32(name='VirtualWareHouseCacheStorage', description='This parameter is required.', example='200'),
  virtualWareHouseClass?: string(name='VirtualWareHouseClass', description='This parameter is required.', example='n1.xlarge'),
  virtualWareHouseId?: string(name='VirtualWareHouseId', description='This parameter is required.', example='vw-uf6a499c0m3w5****'),
}

model CheckModifyVirtualWareHouseResourceResponseBody = {
  data?: {
    expectedDBClusterStatus?: string(name='ExpectedDBClusterStatus', example='ResourceChanging'),
    expectedOrderFinishSeconds?: long(name='ExpectedOrderFinishSeconds', example='60'),
    expectedTargetVirtualWareHouseStatus?: string(name='ExpectedTargetVirtualWareHouseStatus', example='ResourceChanging'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='05321590-BB65-4720-8CB6-8218E041CDD0'),
}

model CheckModifyVirtualWareHouseResourceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckModifyVirtualWareHouseResourceResponseBody(name='body'),
}

/**
 * @summary 计算组变配检查
 *
 * @param request CheckModifyVirtualWareHouseResourceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckModifyVirtualWareHouseResourceResponse
 */
async function checkModifyVirtualWareHouseResourceWithOptions(request: CheckModifyVirtualWareHouseResourceRequest, runtime: Util.RuntimeOptions): CheckModifyVirtualWareHouseResourceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.virtualWareHouseCacheStorage)) {
    query['VirtualWareHouseCacheStorage'] = request.virtualWareHouseCacheStorage;
  }
  if (!Util.isUnset(request.virtualWareHouseClass)) {
    query['VirtualWareHouseClass'] = request.virtualWareHouseClass;
  }
  if (!Util.isUnset(request.virtualWareHouseId)) {
    query['VirtualWareHouseId'] = request.virtualWareHouseId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CheckModifyVirtualWareHouseResource',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 计算组变配检查
 *
 * @param request CheckModifyVirtualWareHouseResourceRequest
 * @return CheckModifyVirtualWareHouseResourceResponse
 */
async function checkModifyVirtualWareHouseResource(request: CheckModifyVirtualWareHouseResourceRequest): CheckModifyVirtualWareHouseResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkModifyVirtualWareHouseResourceWithOptions(request, runtime);
}

model CreateAccountRequest {
  account?: string(name='Account', description='This parameter is required.', example='test'),
  comment?: string(name='Comment', example='test'),
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.', example='cc-8vbsom12x476u****'),
  password?: string(name='Password', example='123456Aa'),
  passwordSha256Hex?: string(name='PasswordSha256Hex', example='b17e1e0450dac425ea318253f6f852972d69731d6c7499c001468b695b6da219'),
  privilegeType?: string(name='PrivilegeType', description='This parameter is required.', example='Normal'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
}

model CreateAccountResponseBody = {
  requestId?: string(name='RequestId', example='8FE02123-D2A3-5CDE-939D-E9B477E00E68'),
}

model CreateAccountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAccountResponseBody(name='body'),
}

/**
 * @summary 创建实例账户
 *
 * @param request CreateAccountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAccountResponse
 */
async function createAccountWithOptions(request: CreateAccountRequest, runtime: Util.RuntimeOptions): CreateAccountResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.account)) {
    query['Account'] = request.account;
  }
  if (!Util.isUnset(request.comment)) {
    query['Comment'] = request.comment;
  }
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.password)) {
    query['Password'] = request.password;
  }
  if (!Util.isUnset(request.passwordSha256Hex)) {
    query['PasswordSha256Hex'] = request.passwordSha256Hex;
  }
  if (!Util.isUnset(request.privilegeType)) {
    query['PrivilegeType'] = request.privilegeType;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateAccount',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建实例账户
 *
 * @param request CreateAccountRequest
 * @return CreateAccountResponse
 */
async function createAccount(request: CreateAccountRequest): CreateAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAccountWithOptions(request, runtime);
}

model CreateClusterRequest {
  autoRenew?: boolean(name='AutoRenew', example='false'),
  DBClusterDescription?: string(name='DBClusterDescription', example='test'),
  payType?: string(name='PayType', description='This parameter is required.', example='Postpaid'),
  period?: string(name='Period', example='Month'),
  regionId?: string(name='RegionId', description='This parameter is required.', example='cn-hangzhou'),
  usedTime?: string(name='UsedTime', example='1'),
  virtualWareHouseCacheStorage?: int32(name='VirtualWareHouseCacheStorage', description='This parameter is required.', example='400'),
  virtualWareHouseClass?: string(name='VirtualWareHouseClass', description='This parameter is required.', example='n1.xlarge'),
  virtualWareHouseDescription?: string(name='VirtualWareHouseDescription', example='test'),
  vpcId?: string(name='VpcId', description='VPC ID。

This parameter is required.', example='vpc-uf6xmupdn7v6ui9f****'),
  vswitchId?: string(name='VswitchId', description='This parameter is required.', example='vsw-uf632qye9oqt4x4sr****'),
  zoneId?: string(name='ZoneId', description='This parameter is required.', example='cn-hangzhou-h'),
}

model CreateClusterResponseBody = {
  data?: {
    DBClusterId?: string(name='DBClusterId', example='cc-bp123bm6vy801****'),
    orderId?: long(name='OrderId', example='21154955706****'),
    virtualWareHouseId?: string(name='VirtualWareHouseId', example='vw-uf6a499c0m3w5****'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='F5178C10-1407-4987-9133-DE4DC9119F75'),
}

model CreateClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateClusterResponseBody(name='body'),
}

/**
 * @summary 创建实例
 *
 * @param request CreateClusterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateClusterResponse
 */
async function createClusterWithOptions(request: CreateClusterRequest, runtime: Util.RuntimeOptions): CreateClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.autoRenew)) {
    query['AutoRenew'] = request.autoRenew;
  }
  if (!Util.isUnset(request.DBClusterDescription)) {
    query['DBClusterDescription'] = request.DBClusterDescription;
  }
  if (!Util.isUnset(request.payType)) {
    query['PayType'] = request.payType;
  }
  if (!Util.isUnset(request.period)) {
    query['Period'] = request.period;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.usedTime)) {
    query['UsedTime'] = request.usedTime;
  }
  if (!Util.isUnset(request.virtualWareHouseCacheStorage)) {
    query['VirtualWareHouseCacheStorage'] = request.virtualWareHouseCacheStorage;
  }
  if (!Util.isUnset(request.virtualWareHouseClass)) {
    query['VirtualWareHouseClass'] = request.virtualWareHouseClass;
  }
  if (!Util.isUnset(request.virtualWareHouseDescription)) {
    query['VirtualWareHouseDescription'] = request.virtualWareHouseDescription;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }
  if (!Util.isUnset(request.vswitchId)) {
    query['VswitchId'] = request.vswitchId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateCluster',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建实例
 *
 * @param request CreateClusterRequest
 * @return CreateClusterResponse
 */
async function createCluster(request: CreateClusterRequest): CreateClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return createClusterWithOptions(request, runtime);
}

model CreateVirtualWareHouseRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.', example='cc-bp108z124a8o7****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  virtualWareHouseCacheStorage?: int32(name='VirtualWareHouseCacheStorage', description='This parameter is required.', example='200'),
  virtualWareHouseClass?: string(name='VirtualWareHouseClass', description='This parameter is required.', example='n1.xlarge'),
  virtualWareHouseDescription?: string(name='VirtualWareHouseDescription', example='test'),
  vswitchId?: string(name='VswitchId', example='vsw-uf632qye9oqt4x4sr****'),
  zoneId?: string(name='ZoneId', example='cn-hangzhou-h'),
}

model CreateVirtualWareHouseResponseBody = {
  data?: {
    orderId?: long(name='OrderId', example='21155221661****'),
    virtualWareHouseId?: string(name='VirtualWareHouseId', example='vw-bp1w2728d535t****'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='2FED790E-FB61-4721-8C1C-07C627FA5A19'),
}

model CreateVirtualWareHouseResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateVirtualWareHouseResponseBody(name='body'),
}

/**
 * @summary 创建计算组
 *
 * @param request CreateVirtualWareHouseRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateVirtualWareHouseResponse
 */
async function createVirtualWareHouseWithOptions(request: CreateVirtualWareHouseRequest, runtime: Util.RuntimeOptions): CreateVirtualWareHouseResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.virtualWareHouseCacheStorage)) {
    query['VirtualWareHouseCacheStorage'] = request.virtualWareHouseCacheStorage;
  }
  if (!Util.isUnset(request.virtualWareHouseClass)) {
    query['VirtualWareHouseClass'] = request.virtualWareHouseClass;
  }
  if (!Util.isUnset(request.virtualWareHouseDescription)) {
    query['VirtualWareHouseDescription'] = request.virtualWareHouseDescription;
  }
  if (!Util.isUnset(request.vswitchId)) {
    query['VswitchId'] = request.vswitchId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateVirtualWareHouse',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建计算组
 *
 * @param request CreateVirtualWareHouseRequest
 * @return CreateVirtualWareHouseResponse
 */
async function createVirtualWareHouse(request: CreateVirtualWareHouseRequest): CreateVirtualWareHouseResponse {
  var runtime = new Util.RuntimeOptions{};
  return createVirtualWareHouseWithOptions(request, runtime);
}

model DeleteAccountRequest {
  account?: string(name='Account', description='This parameter is required.', example='test'),
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.', example='cc-bp108z124a8o7****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
}

model DeleteAccountResponseBody = {
  requestId?: string(name='RequestId', example='2FED790E-FB61-4721-8C1C-07C627FA5A19'),
}

model DeleteAccountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAccountResponseBody(name='body'),
}

/**
 * @summary 删除实例账户
 *
 * @param request DeleteAccountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAccountResponse
 */
async function deleteAccountWithOptions(request: DeleteAccountRequest, runtime: Util.RuntimeOptions): DeleteAccountResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.account)) {
    query['Account'] = request.account;
  }
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAccount',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除实例账户
 *
 * @param request DeleteAccountRequest
 * @return DeleteAccountResponse
 */
async function deleteAccount(request: DeleteAccountRequest): DeleteAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAccountWithOptions(request, runtime);
}

model DeleteClusterRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.', example='cc-bp1qx68m06981****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
}

model DeleteClusterResponseBody = {
  data?: {
    orderId?: long(name='OrderId', example='21152382576****'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='5B1C3974-F13D-5510-9131-DC4A4C8B09C6'),
}

model DeleteClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteClusterResponseBody(name='body'),
}

/**
 * @summary 删除实例
 *
 * @param request DeleteClusterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteClusterResponse
 */
async function deleteClusterWithOptions(request: DeleteClusterRequest, runtime: Util.RuntimeOptions): DeleteClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCluster',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除实例
 *
 * @param request DeleteClusterRequest
 * @return DeleteClusterResponse
 */
async function deleteCluster(request: DeleteClusterRequest): DeleteClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteClusterWithOptions(request, runtime);
}

model DeleteClusterSecurityIPGroupRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.', example='cc-bp108z124a8o7****'),
  groupName?: string(name='GroupName', description='This parameter is required.', example='test'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
}

model DeleteClusterSecurityIPGroupResponseBody = {
  requestId?: string(name='RequestId', example='F5178C10-1407-4987-9133-DE4DC9119F75'),
}

model DeleteClusterSecurityIPGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteClusterSecurityIPGroupResponseBody(name='body'),
}

/**
 * @summary 删除实例IP白名单组
 *
 * @param request DeleteClusterSecurityIPGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteClusterSecurityIPGroupResponse
 */
async function deleteClusterSecurityIPGroupWithOptions(request: DeleteClusterSecurityIPGroupRequest, runtime: Util.RuntimeOptions): DeleteClusterSecurityIPGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.groupName)) {
    query['GroupName'] = request.groupName;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteClusterSecurityIPGroup',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除实例IP白名单组
 *
 * @param request DeleteClusterSecurityIPGroupRequest
 * @return DeleteClusterSecurityIPGroupResponse
 */
async function deleteClusterSecurityIPGroup(request: DeleteClusterSecurityIPGroupRequest): DeleteClusterSecurityIPGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteClusterSecurityIPGroupWithOptions(request, runtime);
}

model DeleteVirtualWareHouseRequest {
  DBClusterId?: string(name='DBClusterId', example='cc-bp1qx68m06981****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  virtualWareHouseId?: string(name='VirtualWareHouseId', description='This parameter is required.', example='vw-bp1w2728d535t****'),
}

model DeleteVirtualWareHouseResponseBody = {
  data?: {
    orderId?: long(name='OrderId', example='21152153510****'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='D0CEC6AC-7760-409A-A0D5-E6CD8660E9CC'),
}

model DeleteVirtualWareHouseResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteVirtualWareHouseResponseBody(name='body'),
}

/**
 * @summary 删除计算组
 *
 * @param request DeleteVirtualWareHouseRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteVirtualWareHouseResponse
 */
async function deleteVirtualWareHouseWithOptions(request: DeleteVirtualWareHouseRequest, runtime: Util.RuntimeOptions): DeleteVirtualWareHouseResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.virtualWareHouseId)) {
    query['VirtualWareHouseId'] = request.virtualWareHouseId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteVirtualWareHouse',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除计算组
 *
 * @param request DeleteVirtualWareHouseRequest
 * @return DeleteVirtualWareHouseResponse
 */
async function deleteVirtualWareHouse(request: DeleteVirtualWareHouseRequest): DeleteVirtualWareHouseResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteVirtualWareHouseWithOptions(request, runtime);
}

model DescribeAccountRequest {
  account?: string(name='Account', description='This parameter is required.', example='test'),
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.', example='cc-bp108z124a8o7****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
}

model DescribeAccountResponseBody = {
  data?: {
    account?: string(name='Account', example='test'),
    comment?: string(name='Comment', example='test'),
    passwordSha256Hex?: string(name='PasswordSha256Hex', example='cd0289a263bf4146a2e00888321178234b65e8c050142074ad05683e3749****'),
    privilegeDescription?: string(name='PrivilegeDescription'),
    privilegeType?: string(name='PrivilegeType', example='Super'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='92016D5B-899D-5B77-A8A7-EFE523D4C80A'),
}

model DescribeAccountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAccountResponseBody(name='body'),
}

/**
 * @summary 查看实例账户详情
 *
 * @param request DescribeAccountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAccountResponse
 */
async function describeAccountWithOptions(request: DescribeAccountRequest, runtime: Util.RuntimeOptions): DescribeAccountResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.account)) {
    query['Account'] = request.account;
  }
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAccount',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查看实例账户详情
 *
 * @param request DescribeAccountRequest
 * @return DescribeAccountResponse
 */
async function describeAccount(request: DescribeAccountRequest): DescribeAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAccountWithOptions(request, runtime);
}

model DescribeClusterRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.', example='cc-uf6a499c0m3w5****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
}

model DescribeClusterResponseBody = {
  data?: {
    aliUid?: long(name='AliUid', example='140692647406****'),
    cacheStorageSizeGiB?: int32(name='CacheStorageSizeGiB', example='200'),
    cacheStorageType?: string(name='CacheStorageType', example='CloudESSD'),
    commodityCode?: string(name='CommodityCode', example='clickhouse_go_public_cn'),
    createTime?: string(name='CreateTime', example='2022-03-18T08:14:48Z'),
    DBClusterDescription?: string(name='DBClusterDescription', example='test'),
    DBClusterId?: string(name='DBClusterId', example='cc-uf6a499c0m3w5****'),
    DBClusterStatus?: string(name='DBClusterStatus', example='Running'),
    engineVersion?: string(name='EngineVersion', example='21.8'),
    expireTime?: string(name='ExpireTime', example='2022-04-17T08:14:48Z'),
    lockMode?: string(name='LockMode', example='Unlock'),
    lockReason?: string(name='LockReason', example='DISK_FULL'),
    objectStoreSizeGiB?: long(name='ObjectStoreSizeGiB', example='0'),
    payType?: string(name='PayType', example='Postpaid'),
    regionId?: string(name='RegionId', example='cn-hangzhou'),
    resourceCpuCores?: int32(name='ResourceCpuCores', example='8'),
    resourceMemoryGiB?: int32(name='ResourceMemoryGiB', example='32'),
    virtualWareHouses?: [ 
      {
        ports?: string(name='Ports', example='tcp:9000,http:8123,mysql:9004'),
        virtualWareHouseCacheStorage?: int32(name='VirtualWareHouseCacheStorage', example='200'),
        virtualWareHouseClass?: string(name='VirtualWareHouseClass', example='n1.xlarge'),
        virtualWareHouseDescription?: string(name='VirtualWareHouseDescription', example='test'),
        virtualWareHouseId?: string(name='VirtualWareHouseId', example='vw-bp1w2728d535t****'),
        virtualWareHouseStatus?: string(name='VirtualWareHouseStatus', example='Running'),
        vswitchId?: string(name='VswitchId', example='vsw-2vcmrf8c878scsv43****'),
        zoneId?: string(name='ZoneId', example='cn-hangzhou-h'),
      }
    ](name='VirtualWareHouses'),
    vpcId?: string(name='VpcId', description='VPC ID。', example='vpc-wz9duj8xd6r1gzhsg*****'),
    vswitchId?: string(name='VswitchId', example='vsw-2vcmrf8c878scsv43****'),
    zoneId?: string(name='ZoneId', example='cn-hangzhou-h'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='9140518B-F330-5364-82FE-EC7298816EDF'),
}

model DescribeClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClusterResponseBody(name='body'),
}

/**
 * @summary 查看实例详情
 *
 * @param request DescribeClusterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterResponse
 */
async function describeClusterWithOptions(request: DescribeClusterRequest, runtime: Util.RuntimeOptions): DescribeClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeCluster',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查看实例详情
 *
 * @param request DescribeClusterRequest
 * @return DescribeClusterResponse
 */
async function describeCluster(request: DescribeClusterRequest): DescribeClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterWithOptions(request, runtime);
}

model DescribeClusterSecurityInfoRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.', example='cc-bp1p816075e21****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
}

model DescribeClusterSecurityInfoResponseBody = {
  data?: {
    securityIpGroups?: [ 
      {
        groupName?: string(name='GroupName', example='test'),
        securityIps?: string(name='SecurityIps', example='192.168.xx.xx,192.168.xx.xx'),
      }
    ](name='SecurityIpGroups'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='2371CC7A-E9C3-5817-97C9-F6333D74BA6C'),
}

model DescribeClusterSecurityInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClusterSecurityInfoResponseBody(name='body'),
}

/**
 * @summary 查看实例白名单配置
 *
 * @param request DescribeClusterSecurityInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterSecurityInfoResponse
 */
async function describeClusterSecurityInfoWithOptions(request: DescribeClusterSecurityInfoRequest, runtime: Util.RuntimeOptions): DescribeClusterSecurityInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterSecurityInfo',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查看实例白名单配置
 *
 * @param request DescribeClusterSecurityInfoRequest
 * @return DescribeClusterSecurityInfoResponse
 */
async function describeClusterSecurityInfo(request: DescribeClusterSecurityInfoRequest): DescribeClusterSecurityInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterSecurityInfoWithOptions(request, runtime);
}

model DescribeClusterStatusSetResponseBody = {
  data?: [ 
    {
      desc?: string(name='Desc'),
      value?: string(name='Value', example='Running'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId', example='F5178C10-1407-4987-9133-DE4DC9119F75'),
}

model DescribeClusterStatusSetResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClusterStatusSetResponseBody(name='body'),
}

/**
 * @summary 查看实例状态集合
 *
 * @param request DescribeClusterStatusSetRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterStatusSetResponse
 */
async function describeClusterStatusSetWithOptions(runtime: Util.RuntimeOptions): DescribeClusterStatusSetResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'DescribeClusterStatusSet',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查看实例状态集合
 *
 * @return DescribeClusterStatusSetResponse
 */
async function describeClusterStatusSet(): DescribeClusterStatusSetResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterStatusSetWithOptions(runtime);
}

model DescribeRegionsRequest {
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  zoneId?: string(name='ZoneId', example='cn-hangzhou-h'),
}

model DescribeRegionsResponseBody = {
  data?: [ 
    {
      regionId?: string(name='RegionId', example='cn-hangzhou'),
      zones?: [ 
        {
          vpcEnabled?: boolean(name='VpcEnabled', example='true'),
          zoneId?: string(name='ZoneId', example='cn-hangzhou-h'),
        }
      ](name='Zones'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId', example='F5178C10-1407-4987-9133-DE4DC9119F75'),
}

model DescribeRegionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRegionsResponseBody(name='body'),
}

/**
 * @summary 查看可服务Region和Zone
 *
 * @param request DescribeRegionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRegionsResponse
 */
async function describeRegionsWithOptions(request: DescribeRegionsRequest, runtime: Util.RuntimeOptions): DescribeRegionsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRegions',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查看可服务Region和Zone
 *
 * @param request DescribeRegionsRequest
 * @return DescribeRegionsResponse
 */
async function describeRegions(request: DescribeRegionsRequest): DescribeRegionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRegionsWithOptions(request, runtime);
}

model DescribeRunningQueryRequest {
  DBClusterId?: string(name='DBClusterId', example='cc-bp1qx68m06981****'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='30'),
  queryDurationMs?: long(name='QueryDurationMs', example='1000'),
  queryId?: string(name='QueryId', example='c8cbcbaf-d4ab-4e74-900d-90d7c0aecaae'),
  queryKeyWord?: string(name='QueryKeyWord', example='order by'),
  queryUser?: string(name='QueryUser', example='test'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  virtualWareHouseId?: string(name='VirtualWareHouseId', description='This parameter is required.', example='vw-uf62965t8lt50****'),
}

model DescribeRunningQueryResponseBody = {
  data?: [ 
    {
      initialAddress?: string(name='InitialAddress', example='::ffff:10.1.XX.XX'),
      initialQueryId?: string(name='InitialQueryId', example='7c28bbbb-753b-4eba-98b1-efcbe2b9bdf6'),
      initialUser?: string(name='InitialUser', example='test'),
      query?: string(name='Query', example='select * from test order by score limit 1;'),
      queryDurationMs?: long(name='QueryDurationMs', example='2000'),
      queryStartTime?: string(name='QueryStartTime', example='2021-02-02T09:14:48Z'),
    }
  ](name='Data'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='30'),
  requestId?: string(name='RequestId', example='48CBEEBE-FA07-5A06-8BA4-567B92ADD6A0'),
  totalCount?: int32(name='TotalCount', example='1'),
}

model DescribeRunningQueryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRunningQueryResponseBody(name='body'),
}

/**
 * @summary 查看计算组正在运行查询列表
 *
 * @param request DescribeRunningQueryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRunningQueryResponse
 */
async function describeRunningQueryWithOptions(request: DescribeRunningQueryRequest, runtime: Util.RuntimeOptions): DescribeRunningQueryResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.queryDurationMs)) {
    query['QueryDurationMs'] = request.queryDurationMs;
  }
  if (!Util.isUnset(request.queryId)) {
    query['QueryId'] = request.queryId;
  }
  if (!Util.isUnset(request.queryKeyWord)) {
    query['QueryKeyWord'] = request.queryKeyWord;
  }
  if (!Util.isUnset(request.queryUser)) {
    query['QueryUser'] = request.queryUser;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.virtualWareHouseId)) {
    query['VirtualWareHouseId'] = request.virtualWareHouseId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRunningQuery',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查看计算组正在运行查询列表
 *
 * @param request DescribeRunningQueryRequest
 * @return DescribeRunningQueryResponse
 */
async function describeRunningQuery(request: DescribeRunningQueryRequest): DescribeRunningQueryResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRunningQueryWithOptions(request, runtime);
}

model DescribeSlowQueryRequest {
  DBClusterId?: string(name='DBClusterId', example='cc-bp1qx68m06981****'),
  endTime?: string(name='EndTime', example='2021-02-02T09:30:00Z'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='30'),
  queryDurationMs?: long(name='QueryDurationMs', example='1000'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  startTime?: string(name='StartTime', example='2021-02-02T08:30:00Z'),
  virtualWareHouseId?: string(name='VirtualWareHouseId', description='This parameter is required.', example='vw-uf62965t8lt50****'),
}

model DescribeSlowQueryResponseBody = {
  data?: [ 
    {
      initialAddress?: string(name='InitialAddress', example='::ffff:10.1.XX.XX'),
      initialQueryId?: string(name='InitialQueryId', example='7c28bbbb-753b-4eba-98b1-efcbe2b9bdf6'),
      initialUser?: string(name='InitialUser', example='test'),
      memoryUsage?: long(name='MemoryUsage', example='1024000000'),
      query?: string(name='Query', example='select * from test order by score limit 1;'),
      queryDurationMs?: long(name='QueryDurationMs', example='2000'),
      queryStartTime?: string(name='QueryStartTime', example='2021-02-02T08:30:00Z'),
      queryState?: string(name='QueryState', example='QueryFinish'),
      readBytes?: long(name='ReadBytes', example='9141300000'),
      readRows?: long(name='ReadRows', example='1000000'),
      resultBytes?: long(name='ResultBytes', example='8174'),
      resultRows?: long(name='ResultRows', example='1'),
    }
  ](name='Data'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='30'),
  requestId?: string(name='RequestId', example='48CBEEBE-FA07-5A06-8BA4-567B92ADD6A0'),
  totalCount?: int32(name='TotalCount', example='1'),
}

model DescribeSlowQueryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSlowQueryResponseBody(name='body'),
}

/**
 * @summary 查看计算组慢查询详情
 *
 * @param request DescribeSlowQueryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSlowQueryResponse
 */
async function describeSlowQueryWithOptions(request: DescribeSlowQueryRequest, runtime: Util.RuntimeOptions): DescribeSlowQueryResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.queryDurationMs)) {
    query['QueryDurationMs'] = request.queryDurationMs;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.virtualWareHouseId)) {
    query['VirtualWareHouseId'] = request.virtualWareHouseId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSlowQuery',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查看计算组慢查询详情
 *
 * @param request DescribeSlowQueryRequest
 * @return DescribeSlowQueryResponse
 */
async function describeSlowQuery(request: DescribeSlowQueryRequest): DescribeSlowQueryResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSlowQueryWithOptions(request, runtime);
}

model DescribeSlowQueryTrendRequest {
  DBClusterId?: string(name='DBClusterId', example='cc-bp1qx68m06981****'),
  endTime?: string(name='EndTime', example='2021-02-02T09:00:00Z'),
  queryDurationMs?: long(name='QueryDurationMs', example='1000'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  startTime?: string(name='StartTime', example='2021-02-02T08:00:00Z'),
  virtualWareHouseId?: string(name='VirtualWareHouseId', description='This parameter is required.', example='vw-uf62965t8lt50****'),
}

model DescribeSlowQueryTrendResponseBody = {
  data?: [ 
    {
      avgDurationMs?: long(name='AvgDurationMs', example='2000'),
      count?: int32(name='Count', example='1'),
      maxDurationMs?: long(name='MaxDurationMs', example='3000'),
      minDurationMs?: long(name='MinDurationMs', example='1000'),
      startTime?: string(name='StartTime', example='2021-02-02T08:00:00Z'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId', example='48CBEEBE-FA07-5A06-8BA4-567B92ADD6A0'),
}

model DescribeSlowQueryTrendResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSlowQueryTrendResponseBody(name='body'),
}

/**
 * @summary 查看计算组慢查询趋势 以1分钟为间隔统计
 *
 * @param request DescribeSlowQueryTrendRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSlowQueryTrendResponse
 */
async function describeSlowQueryTrendWithOptions(request: DescribeSlowQueryTrendRequest, runtime: Util.RuntimeOptions): DescribeSlowQueryTrendResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.queryDurationMs)) {
    query['QueryDurationMs'] = request.queryDurationMs;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.virtualWareHouseId)) {
    query['VirtualWareHouseId'] = request.virtualWareHouseId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSlowQueryTrend',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查看计算组慢查询趋势 以1分钟为间隔统计
 *
 * @param request DescribeSlowQueryTrendRequest
 * @return DescribeSlowQueryTrendResponse
 */
async function describeSlowQueryTrend(request: DescribeSlowQueryTrendRequest): DescribeSlowQueryTrendResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSlowQueryTrendWithOptions(request, runtime);
}

model DescribeVirtualWareHouseRequest {
  DBClusterId?: string(name='DBClusterId', example='cc-bp108z124a8o7****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  virtualWareHouseId?: string(name='VirtualWareHouseId', description='This parameter is required.', example='vw-bp1w2728d535t****'),
}

model DescribeVirtualWareHouseResponseBody = {
  data?: {
    ports?: string(name='Ports', example='tcp:9000,http:8123,mysql:9004'),
    virtualWareHouseCacheStorage?: int32(name='VirtualWareHouseCacheStorage', example='200'),
    virtualWareHouseClass?: string(name='VirtualWareHouseClass', example='n1.xlarge'),
    virtualWareHouseDescription?: string(name='VirtualWareHouseDescription', example='test'),
    virtualWareHouseId?: string(name='VirtualWareHouseId', example='vw-bp1w2728d535t****'),
    virtualWareHouseStatus?: string(name='VirtualWareHouseStatus', example='Running'),
    vswitchId?: string(name='VswitchId', example='vsw-bp1tg609m5j85jejq****'),
    zoneId?: string(name='ZoneId', example='cn-hangzhou-h'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='F543E6CC-6868-523D-8D28-0E92CF977ED2'),
}

model DescribeVirtualWareHouseResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVirtualWareHouseResponseBody(name='body'),
}

/**
 * @summary 查看计算组详情
 *
 * @param request DescribeVirtualWareHouseRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVirtualWareHouseResponse
 */
async function describeVirtualWareHouseWithOptions(request: DescribeVirtualWareHouseRequest, runtime: Util.RuntimeOptions): DescribeVirtualWareHouseResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.virtualWareHouseId)) {
    query['VirtualWareHouseId'] = request.virtualWareHouseId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeVirtualWareHouse',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查看计算组详情
 *
 * @param request DescribeVirtualWareHouseRequest
 * @return DescribeVirtualWareHouseResponse
 */
async function describeVirtualWareHouse(request: DescribeVirtualWareHouseRequest): DescribeVirtualWareHouseResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeVirtualWareHouseWithOptions(request, runtime);
}

model DescribeVirtualWareHouseClassSetResponseBody = {
  data?: [ 
    {
      cacheStorageStep?: int32(name='CacheStorageStep', example='100'),
      cpuCores?: int32(name='CpuCores', example='16'),
      maxCacheStorage?: int32(name='MaxCacheStorage', example='32000'),
      memoryGiB?: int32(name='MemoryGiB', example='64'),
      minCacheStorage?: int32(name='MinCacheStorage', example='200'),
      value?: string(name='Value', example='n1.2xlarge'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId', example='F5178C10-1407-4987-9133-DE4DC9119F75'),
}

model DescribeVirtualWareHouseClassSetResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVirtualWareHouseClassSetResponseBody(name='body'),
}

/**
 * @summary 查看计算组规格码集合
 *
 * @param request DescribeVirtualWareHouseClassSetRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVirtualWareHouseClassSetResponse
 */
async function describeVirtualWareHouseClassSetWithOptions(runtime: Util.RuntimeOptions): DescribeVirtualWareHouseClassSetResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'DescribeVirtualWareHouseClassSet',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查看计算组规格码集合
 *
 * @return DescribeVirtualWareHouseClassSetResponse
 */
async function describeVirtualWareHouseClassSet(): DescribeVirtualWareHouseClassSetResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeVirtualWareHouseClassSetWithOptions(runtime);
}

model DescribeVirtualWareHouseEndpointInfoRequest {
  DBClusterId?: string(name='DBClusterId', example='cc-bp1qx68m06981****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  virtualWareHouseId?: string(name='VirtualWareHouseId', description='This parameter is required.', example='vw-bp11gxp8g992f****'),
}

model DescribeVirtualWareHouseEndpointInfoResponseBody = {
  data?: [ 
    {
      endpointType?: string(name='EndpointType', example='slb'),
      ip?: string(name='Ip', example='10.0.xx.xx'),
      netType?: string(name='NetType', example='intranet'),
      ports?: string(name='Ports', example='tcp:9000,http:8123,mysql:9004'),
      status?: string(name='Status', example='Ready'),
      url?: string(name='Url', example='vw-bp11gxp8g992f****.clickhouse.ads.aliyuncs.com'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId', example='7EE0EF77-B7BA-5EE3-9B11-F8DE7B65BAB8'),
}

model DescribeVirtualWareHouseEndpointInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVirtualWareHouseEndpointInfoResponseBody(name='body'),
}

/**
 * @summary 查看计算组链接信息
 *
 * @param request DescribeVirtualWareHouseEndpointInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVirtualWareHouseEndpointInfoResponse
 */
async function describeVirtualWareHouseEndpointInfoWithOptions(request: DescribeVirtualWareHouseEndpointInfoRequest, runtime: Util.RuntimeOptions): DescribeVirtualWareHouseEndpointInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.virtualWareHouseId)) {
    query['VirtualWareHouseId'] = request.virtualWareHouseId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeVirtualWareHouseEndpointInfo',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查看计算组链接信息
 *
 * @param request DescribeVirtualWareHouseEndpointInfoRequest
 * @return DescribeVirtualWareHouseEndpointInfoResponse
 */
async function describeVirtualWareHouseEndpointInfo(request: DescribeVirtualWareHouseEndpointInfoRequest): DescribeVirtualWareHouseEndpointInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeVirtualWareHouseEndpointInfoWithOptions(request, runtime);
}

model DescribeVirtualWareHouseStatusSetResponseBody = {
  data?: [ 
    {
      desc?: string(name='Desc'),
      value?: string(name='Value', example='Running'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId', example='FDF272C3-8FD0-507B-8E63-A19495217339'),
}

model DescribeVirtualWareHouseStatusSetResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVirtualWareHouseStatusSetResponseBody(name='body'),
}

/**
 * @summary 查看计算组状态集合
 *
 * @param request DescribeVirtualWareHouseStatusSetRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVirtualWareHouseStatusSetResponse
 */
async function describeVirtualWareHouseStatusSetWithOptions(runtime: Util.RuntimeOptions): DescribeVirtualWareHouseStatusSetResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'DescribeVirtualWareHouseStatusSet',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查看计算组状态集合
 *
 * @return DescribeVirtualWareHouseStatusSetResponse
 */
async function describeVirtualWareHouseStatusSet(): DescribeVirtualWareHouseStatusSetResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeVirtualWareHouseStatusSetWithOptions(runtime);
}

model GetDistributedTablesBufferSizeRequest {
  DBClusterId?: string(name='DBClusterId', example='cc-bp1qx68m06981****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  virtualWareHouseId?: string(name='VirtualWareHouseId', description='This parameter is required.', example='vw-uf62965t8lt50****'),
}

model GetDistributedTablesBufferSizeResponseBody = {
  data?: {
    bufferSizeGiB?: int32(name='BufferSizeGiB', example='100'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='48CBEEBE-FA07-5A06-8BA4-567B92ADD6A0'),
}

model GetDistributedTablesBufferSizeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDistributedTablesBufferSizeResponseBody(name='body'),
}

/**
 * @summary 查询分布式表缓存大小
 *
 * @param request GetDistributedTablesBufferSizeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDistributedTablesBufferSizeResponse
 */
async function getDistributedTablesBufferSizeWithOptions(request: GetDistributedTablesBufferSizeRequest, runtime: Util.RuntimeOptions): GetDistributedTablesBufferSizeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.virtualWareHouseId)) {
    query['VirtualWareHouseId'] = request.virtualWareHouseId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDistributedTablesBufferSize',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询分布式表缓存大小
 *
 * @param request GetDistributedTablesBufferSizeRequest
 * @return GetDistributedTablesBufferSizeResponse
 */
async function getDistributedTablesBufferSize(request: GetDistributedTablesBufferSizeRequest): GetDistributedTablesBufferSizeResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDistributedTablesBufferSizeWithOptions(request, runtime);
}

model KillQueryRequest {
  DBClusterId?: string(name='DBClusterId', example='cc-bp1qx68m06981****'),
  queryIds?: string(name='QueryIds', example='21152382576****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  virtualWareHouseId?: string(name='VirtualWareHouseId', description='This parameter is required.', example='vw-uf62965t8lt50****'),
}

model KillQueryResponseBody = {
  requestId?: string(name='RequestId', example='48CBEEBE-FA07-5A06-8BA4-567B92ADD6A0'),
}

model KillQueryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: KillQueryResponseBody(name='body'),
}

/**
 * @summary Kill计算组查询
 *
 * @param request KillQueryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return KillQueryResponse
 */
async function killQueryWithOptions(request: KillQueryRequest, runtime: Util.RuntimeOptions): KillQueryResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.queryIds)) {
    query['QueryIds'] = request.queryIds;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.virtualWareHouseId)) {
    query['VirtualWareHouseId'] = request.virtualWareHouseId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'KillQuery',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Kill计算组查询
 *
 * @param request KillQueryRequest
 * @return KillQueryResponse
 */
async function killQuery(request: KillQueryRequest): KillQueryResponse {
  var runtime = new Util.RuntimeOptions{};
  return killQueryWithOptions(request, runtime);
}

model ListAccountsRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.', example='cc-bp1qx68m06981****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
}

model ListAccountsResponseBody = {
  data?: [ 
    {
      account?: string(name='Account', example='test'),
      comment?: string(name='Comment', example='test'),
      passwordSha256Hex?: string(name='PasswordSha256Hex', example='cd0289a263bf4146a2e00888321178234b65e8c050142074ad05683e3749****'),
      privilegeDescription?: string(name='PrivilegeDescription'),
      privilegeType?: string(name='PrivilegeType', example='Normal'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId', example='E889A8CD-A4B4-5676-8EDB-80E06E072353'),
}

model ListAccountsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListAccountsResponseBody(name='body'),
}

/**
 * @summary 查看实例账户详情列表
 *
 * @param request ListAccountsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListAccountsResponse
 */
async function listAccountsWithOptions(request: ListAccountsRequest, runtime: Util.RuntimeOptions): ListAccountsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListAccounts',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查看实例账户详情列表
 *
 * @param request ListAccountsRequest
 * @return ListAccountsResponse
 */
async function listAccounts(request: ListAccountsRequest): ListAccountsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAccountsWithOptions(request, runtime);
}

model ListClustersRequest {
  DBClusterDescription?: string(name='DBClusterDescription', example='test'),
  DBClusterId?: string(name='DBClusterId', example='cc-bp108z124a8o7****'),
  DBClusterStatus?: string(name='DBClusterStatus', example='Running'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='30'),
  regionId?: string(name='RegionId', description='This parameter is required.', example='cn-hangzhou'),
}

model ListClustersResponseBody = {
  data?: [ 
    {
      aliUid?: long(name='AliUid', example='140692647406****'),
      cacheStorageSizeGiB?: int32(name='CacheStorageSizeGiB', example='200'),
      cacheStorageType?: string(name='CacheStorageType', example='CloudESSD'),
      commodityCode?: string(name='CommodityCode', example='clickhouse_go_public_cn'),
      createTime?: string(name='CreateTime', example='2022-03-18T08:14:48Z'),
      DBClusterDescription?: string(name='DBClusterDescription', example='test'),
      DBClusterId?: string(name='DBClusterId', example='cc-bp108z124a8o7****'),
      DBClusterStatus?: string(name='DBClusterStatus', example='Running'),
      engineVersion?: string(name='EngineVersion', example='21.8'),
      expireTime?: string(name='ExpireTime', example='2022-04-17T08:14:48Z'),
      lockMode?: string(name='LockMode', example='Unlock'),
      lockReason?: string(name='LockReason', example='DISK_FULL'),
      objectStoreSizeGiB?: long(name='ObjectStoreSizeGiB', example='0'),
      payType?: string(name='PayType', example='Postpaid'),
      regionId?: string(name='RegionId', example='cn-hangzhou'),
      resourceCpuCores?: int32(name='ResourceCpuCores', example='8'),
      resourceMemoryGiB?: int32(name='ResourceMemoryGiB', example='32'),
      virtualWareHouses?: [ 
        {
          ports?: string(name='Ports', example='tcp:9000,http:8123,mysql:9004'),
          virtualWareHouseCacheStorage?: int32(name='VirtualWareHouseCacheStorage', example='200'),
          virtualWareHouseClass?: string(name='VirtualWareHouseClass', example='n1.xlarge'),
          virtualWareHouseDescription?: string(name='VirtualWareHouseDescription', example='test'),
          virtualWareHouseId?: string(name='VirtualWareHouseId', example='vw-uf6a499c0m3w5****'),
          virtualWareHouseStatus?: string(name='VirtualWareHouseStatus', example='Running'),
          vswitchId?: string(name='VswitchId', example='vsw-bp1tg609m5j85jejq****'),
          zoneId?: string(name='ZoneId', example='cn-hangzhou-h'),
        }
      ](name='VirtualWareHouses'),
      vpcId?: string(name='VpcId', description='VPC ID。', example='vpc-2zedznmtm8j7fksbc****'),
      vswitchId?: string(name='VswitchId', example='vsw-bp1tg609m5j85jejq****'),
      zoneId?: string(name='ZoneId', example='cn-hangzhou-h'),
    }
  ](name='Data'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='30'),
  requestId?: string(name='RequestId', example='DDB109DC-E37D-5475-8D49-47542C57BD38'),
  totalCount?: int32(name='TotalCount', example='1'),
}

model ListClustersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListClustersResponseBody(name='body'),
}

/**
 * @summary 查看实例详情列表
 *
 * @param request ListClustersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListClustersResponse
 */
async function listClustersWithOptions(request: ListClustersRequest, runtime: Util.RuntimeOptions): ListClustersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterDescription)) {
    query['DBClusterDescription'] = request.DBClusterDescription;
  }
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.DBClusterStatus)) {
    query['DBClusterStatus'] = request.DBClusterStatus;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListClusters',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查看实例详情列表
 *
 * @param request ListClustersRequest
 * @return ListClustersResponse
 */
async function listClusters(request: ListClustersRequest): ListClustersResponse {
  var runtime = new Util.RuntimeOptions{};
  return listClustersWithOptions(request, runtime);
}

model ListVirtualWareHouseConfigsRequest {
  DBClusterId?: string(name='DBClusterId', example='cc-bp1p816075e21****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  virtualWareHouseId?: string(name='VirtualWareHouseId', description='This parameter is required.', example='vw-uf6a499c0m3w5****'),
}

model ListVirtualWareHouseConfigsResponseBody = {
  data?: [ 
    {
      configFullPath?: string(name='ConfigFullPath', example='keep_alive_timeout'),
      configType?: string(name='ConfigType', example='config.xml'),
      defaultValue?: string(name='DefaultValue', example='300'),
      description?: string(name='Description', example='The number of seconds that ClickHouse HTTP server waits for incoming requests before closing the connection'),
      needRestart?: boolean(name='NeedRestart', example='true'),
      spec?: string(name='Spec', example='>=10'),
      value?: string(name='Value', example='300'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId', example='87B839E3-7384-52D5-9CAB-756DD3BF7B9B'),
}

model ListVirtualWareHouseConfigsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListVirtualWareHouseConfigsResponseBody(name='body'),
}

/**
 * @summary 查看计算组参数配置列表
 *
 * @param request ListVirtualWareHouseConfigsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListVirtualWareHouseConfigsResponse
 */
async function listVirtualWareHouseConfigsWithOptions(request: ListVirtualWareHouseConfigsRequest, runtime: Util.RuntimeOptions): ListVirtualWareHouseConfigsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.virtualWareHouseId)) {
    query['VirtualWareHouseId'] = request.virtualWareHouseId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListVirtualWareHouseConfigs',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查看计算组参数配置列表
 *
 * @param request ListVirtualWareHouseConfigsRequest
 * @return ListVirtualWareHouseConfigsResponse
 */
async function listVirtualWareHouseConfigs(request: ListVirtualWareHouseConfigsRequest): ListVirtualWareHouseConfigsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listVirtualWareHouseConfigsWithOptions(request, runtime);
}

model ListVirtualWareHousesRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.', example='cc-bp108z124a8o7****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
}

model ListVirtualWareHousesResponseBody = {
  data?: [ 
    {
      ports?: string(name='Ports', example='tcp:9000,http:8123,mysql:9004'),
      virtualWareHouseCacheStorage?: int32(name='VirtualWareHouseCacheStorage', example='200'),
      virtualWareHouseClass?: string(name='VirtualWareHouseClass', example='n1.xlarge'),
      virtualWareHouseDescription?: string(name='VirtualWareHouseDescription', example='test'),
      virtualWareHouseId?: string(name='VirtualWareHouseId', example='vw-bp1w2728d535t****'),
      virtualWareHouseStatus?: string(name='VirtualWareHouseStatus', example='Running'),
      vswitchId?: string(name='VswitchId', example='vsw-bp1tg609m5j85jejq****'),
      zoneId?: string(name='ZoneId', example='cn-hangzhou-h'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId', example='DD4F7C49-09BC-5BA7-BAC9-F0887E368126'),
}

model ListVirtualWareHousesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListVirtualWareHousesResponseBody(name='body'),
}

/**
 * @summary 查看计算组详情列表
 *
 * @param request ListVirtualWareHousesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListVirtualWareHousesResponse
 */
async function listVirtualWareHousesWithOptions(request: ListVirtualWareHousesRequest, runtime: Util.RuntimeOptions): ListVirtualWareHousesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListVirtualWareHouses',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查看计算组详情列表
 *
 * @param request ListVirtualWareHousesRequest
 * @return ListVirtualWareHousesResponse
 */
async function listVirtualWareHouses(request: ListVirtualWareHousesRequest): ListVirtualWareHousesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listVirtualWareHousesWithOptions(request, runtime);
}

model ModifyAccountDescriptionRequest {
  account?: string(name='Account', description='This parameter is required.', example='test'),
  comment?: string(name='Comment', description='This parameter is required.', example='test'),
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.', example='cc-bp108z124a8o7****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
}

model ModifyAccountDescriptionResponseBody = {
  requestId?: string(name='RequestId', example='F5178C10-1407-4987-9133-DE4DC9119F75'),
}

model ModifyAccountDescriptionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyAccountDescriptionResponseBody(name='body'),
}

/**
 * @summary 修改实例账户备注
 *
 * @param request ModifyAccountDescriptionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyAccountDescriptionResponse
 */
async function modifyAccountDescriptionWithOptions(request: ModifyAccountDescriptionRequest, runtime: Util.RuntimeOptions): ModifyAccountDescriptionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.account)) {
    query['Account'] = request.account;
  }
  if (!Util.isUnset(request.comment)) {
    query['Comment'] = request.comment;
  }
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyAccountDescription',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改实例账户备注
 *
 * @param request ModifyAccountDescriptionRequest
 * @return ModifyAccountDescriptionResponse
 */
async function modifyAccountDescription(request: ModifyAccountDescriptionRequest): ModifyAccountDescriptionResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyAccountDescriptionWithOptions(request, runtime);
}

model ModifyAccountPrivilegeRequest {
  account?: string(name='Account', description='This parameter is required.', example='test'),
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.', example='cc-bp108z124a8o7****'),
  privilegeType?: string(name='PrivilegeType', description='This parameter is required.', example='Normal'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
}

model ModifyAccountPrivilegeResponseBody = {
  requestId?: string(name='RequestId', example='2FED790E-FB61-4721-8C1C-07C627FA5A19'),
}

model ModifyAccountPrivilegeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyAccountPrivilegeResponseBody(name='body'),
}

/**
 * @summary 修改实例账户权限级别
 *
 * @param request ModifyAccountPrivilegeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyAccountPrivilegeResponse
 */
async function modifyAccountPrivilegeWithOptions(request: ModifyAccountPrivilegeRequest, runtime: Util.RuntimeOptions): ModifyAccountPrivilegeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.account)) {
    query['Account'] = request.account;
  }
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.privilegeType)) {
    query['PrivilegeType'] = request.privilegeType;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyAccountPrivilege',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改实例账户权限级别
 *
 * @param request ModifyAccountPrivilegeRequest
 * @return ModifyAccountPrivilegeResponse
 */
async function modifyAccountPrivilege(request: ModifyAccountPrivilegeRequest): ModifyAccountPrivilegeResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyAccountPrivilegeWithOptions(request, runtime);
}

model ModifyClusterDescriptionRequest {
  DBClusterDescription?: string(name='DBClusterDescription', description='This parameter is required.', example='test'),
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.', example='cc-bp1qx68m06981****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
}

model ModifyClusterDescriptionResponseBody = {
  requestId?: string(name='RequestId', example='F5178C10-1407-4987-9133-DE4DC9119F75'),
}

model ModifyClusterDescriptionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyClusterDescriptionResponseBody(name='body'),
}

/**
 * @summary 修改实例描述信息
 *
 * @param request ModifyClusterDescriptionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyClusterDescriptionResponse
 */
async function modifyClusterDescriptionWithOptions(request: ModifyClusterDescriptionRequest, runtime: Util.RuntimeOptions): ModifyClusterDescriptionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterDescription)) {
    query['DBClusterDescription'] = request.DBClusterDescription;
  }
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyClusterDescription',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改实例描述信息
 *
 * @param request ModifyClusterDescriptionRequest
 * @return ModifyClusterDescriptionResponse
 */
async function modifyClusterDescription(request: ModifyClusterDescriptionRequest): ModifyClusterDescriptionResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyClusterDescriptionWithOptions(request, runtime);
}

model ModifyVirtualWareHouseConfigRequest {
  configChanges?: [ 
    {
      configFullPath?: string(name='ConfigFullPath', description='This parameter is required.', example='keep_alive_timeout'),
      value?: string(name='Value', description='This parameter is required.', example='300'),
    }
  ](name='ConfigChanges', description='This parameter is required.'),
  DBClusterId?: string(name='DBClusterId', example='cc-bp1qx68m06981****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  virtualWareHouseId?: string(name='VirtualWareHouseId', description='This parameter is required.', example='vw-uf62965t8lt50****'),
}

model ModifyVirtualWareHouseConfigShrinkRequest {
  configChangesShrink?: string(name='ConfigChanges', description='This parameter is required.'),
  DBClusterId?: string(name='DBClusterId', example='cc-bp1qx68m06981****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  virtualWareHouseId?: string(name='VirtualWareHouseId', description='This parameter is required.', example='vw-uf62965t8lt50****'),
}

model ModifyVirtualWareHouseConfigResponseBody = {
  requestId?: string(name='RequestId', example='108B73B2-F513-5250-81DD-48A63E48C373'),
}

model ModifyVirtualWareHouseConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyVirtualWareHouseConfigResponseBody(name='body'),
}

/**
 * @summary 修改计算组参数配置
 *
 * @param tmpReq ModifyVirtualWareHouseConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyVirtualWareHouseConfigResponse
 */
async function modifyVirtualWareHouseConfigWithOptions(tmpReq: ModifyVirtualWareHouseConfigRequest, runtime: Util.RuntimeOptions): ModifyVirtualWareHouseConfigResponse {
  Util.validateModel(tmpReq);
  var request = new ModifyVirtualWareHouseConfigShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.configChanges)) {
    request.configChangesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.configChanges, 'ConfigChanges', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.configChangesShrink)) {
    query['ConfigChanges'] = request.configChangesShrink;
  }
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.virtualWareHouseId)) {
    query['VirtualWareHouseId'] = request.virtualWareHouseId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyVirtualWareHouseConfig',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改计算组参数配置
 *
 * @param request ModifyVirtualWareHouseConfigRequest
 * @return ModifyVirtualWareHouseConfigResponse
 */
async function modifyVirtualWareHouseConfig(request: ModifyVirtualWareHouseConfigRequest): ModifyVirtualWareHouseConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyVirtualWareHouseConfigWithOptions(request, runtime);
}

model ModifyVirtualWareHouseDescriptionRequest {
  DBClusterId?: string(name='DBClusterId', example='cc-bp108z124a8o7****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  virtualWareHouseDescription?: string(name='VirtualWareHouseDescription', description='This parameter is required.', example='test'),
  virtualWareHouseId?: string(name='VirtualWareHouseId', description='This parameter is required.', example='vw-bp1w2728d535t****'),
}

model ModifyVirtualWareHouseDescriptionResponseBody = {
  requestId?: string(name='RequestId', example='F5178C10-1407-4987-9133-DE4DC9119F75'),
}

model ModifyVirtualWareHouseDescriptionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyVirtualWareHouseDescriptionResponseBody(name='body'),
}

/**
 * @summary 修改计算组描述信息
 *
 * @param request ModifyVirtualWareHouseDescriptionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyVirtualWareHouseDescriptionResponse
 */
async function modifyVirtualWareHouseDescriptionWithOptions(request: ModifyVirtualWareHouseDescriptionRequest, runtime: Util.RuntimeOptions): ModifyVirtualWareHouseDescriptionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.virtualWareHouseDescription)) {
    query['VirtualWareHouseDescription'] = request.virtualWareHouseDescription;
  }
  if (!Util.isUnset(request.virtualWareHouseId)) {
    query['VirtualWareHouseId'] = request.virtualWareHouseId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyVirtualWareHouseDescription',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改计算组描述信息
 *
 * @param request ModifyVirtualWareHouseDescriptionRequest
 * @return ModifyVirtualWareHouseDescriptionResponse
 */
async function modifyVirtualWareHouseDescription(request: ModifyVirtualWareHouseDescriptionRequest): ModifyVirtualWareHouseDescriptionResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyVirtualWareHouseDescriptionWithOptions(request, runtime);
}

model ModifyVirtualWareHouseResourceRequest {
  DBClusterId?: string(name='DBClusterId', example='cc-bp108z124a8o7****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  virtualWareHouseCacheStorage?: int32(name='VirtualWareHouseCacheStorage', description='This parameter is required.', example='200'),
  virtualWareHouseClass?: string(name='VirtualWareHouseClass', description='This parameter is required.', example='n1.xlarge'),
  virtualWareHouseId?: string(name='VirtualWareHouseId', description='This parameter is required.', example='vw-uf62965t8lt50****'),
}

model ModifyVirtualWareHouseResourceResponseBody = {
  data?: {
    orderId?: long(name='OrderId', example='21152548723****'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='D0CEC6AC-7760-409A-A0D5-E6CD8660E9CC'),
}

model ModifyVirtualWareHouseResourceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyVirtualWareHouseResourceResponseBody(name='body'),
}

/**
 * @summary 计算组变配
 *
 * @param request ModifyVirtualWareHouseResourceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyVirtualWareHouseResourceResponse
 */
async function modifyVirtualWareHouseResourceWithOptions(request: ModifyVirtualWareHouseResourceRequest, runtime: Util.RuntimeOptions): ModifyVirtualWareHouseResourceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.virtualWareHouseCacheStorage)) {
    query['VirtualWareHouseCacheStorage'] = request.virtualWareHouseCacheStorage;
  }
  if (!Util.isUnset(request.virtualWareHouseClass)) {
    query['VirtualWareHouseClass'] = request.virtualWareHouseClass;
  }
  if (!Util.isUnset(request.virtualWareHouseId)) {
    query['VirtualWareHouseId'] = request.virtualWareHouseId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyVirtualWareHouseResource',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 计算组变配
 *
 * @param request ModifyVirtualWareHouseResourceRequest
 * @return ModifyVirtualWareHouseResourceResponse
 */
async function modifyVirtualWareHouseResource(request: ModifyVirtualWareHouseResourceRequest): ModifyVirtualWareHouseResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyVirtualWareHouseResourceWithOptions(request, runtime);
}

model PatchClusterSecurityIPGroupRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.', example='cc-bp108z124a8o7****'),
  groupName?: string(name='GroupName', description='This parameter is required.', example='test'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  securityIps?: string(name='SecurityIps', description='This parameter is required.', example='192.168.xx.xx'),
}

model PatchClusterSecurityIPGroupResponseBody = {
  requestId?: string(name='RequestId', example='05321590-BB65-4720-8CB6-8218E041CDD0'),
}

model PatchClusterSecurityIPGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PatchClusterSecurityIPGroupResponseBody(name='body'),
}

/**
 * @summary 实例IP白名单组添加IP
 *
 * @param request PatchClusterSecurityIPGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return PatchClusterSecurityIPGroupResponse
 */
async function patchClusterSecurityIPGroupWithOptions(request: PatchClusterSecurityIPGroupRequest, runtime: Util.RuntimeOptions): PatchClusterSecurityIPGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.groupName)) {
    query['GroupName'] = request.groupName;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.securityIps)) {
    query['SecurityIps'] = request.securityIps;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'PatchClusterSecurityIPGroup',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 实例IP白名单组添加IP
 *
 * @param request PatchClusterSecurityIPGroupRequest
 * @return PatchClusterSecurityIPGroupResponse
 */
async function patchClusterSecurityIPGroup(request: PatchClusterSecurityIPGroupRequest): PatchClusterSecurityIPGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return patchClusterSecurityIPGroupWithOptions(request, runtime);
}

model ReleaseVirtualWareHousePublicConnectionRequest {
  DBClusterId?: string(name='DBClusterId', example='cc-bp108z124a8o7****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  virtualWareHouseId?: string(name='VirtualWareHouseId', description='This parameter is required.', example='vw-bp1w2728d535t****'),
}

model ReleaseVirtualWareHousePublicConnectionResponseBody = {
  requestId?: string(name='RequestId', example='05321590-BB65-4720-8CB6-8218E041CDD0'),
}

model ReleaseVirtualWareHousePublicConnectionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ReleaseVirtualWareHousePublicConnectionResponseBody(name='body'),
}

/**
 * @summary 释放计算组公网SLB
 *
 * @param request ReleaseVirtualWareHousePublicConnectionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ReleaseVirtualWareHousePublicConnectionResponse
 */
async function releaseVirtualWareHousePublicConnectionWithOptions(request: ReleaseVirtualWareHousePublicConnectionRequest, runtime: Util.RuntimeOptions): ReleaseVirtualWareHousePublicConnectionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.virtualWareHouseId)) {
    query['VirtualWareHouseId'] = request.virtualWareHouseId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ReleaseVirtualWareHousePublicConnection',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 释放计算组公网SLB
 *
 * @param request ReleaseVirtualWareHousePublicConnectionRequest
 * @return ReleaseVirtualWareHousePublicConnectionResponse
 */
async function releaseVirtualWareHousePublicConnection(request: ReleaseVirtualWareHousePublicConnectionRequest): ReleaseVirtualWareHousePublicConnectionResponse {
  var runtime = new Util.RuntimeOptions{};
  return releaseVirtualWareHousePublicConnectionWithOptions(request, runtime);
}

model ResetAccountPasswordRequest {
  account?: string(name='Account', description='This parameter is required.', example='test'),
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.', example='cc-bp108z124a8o7****'),
  password?: string(name='Password', example='123456Aa'),
  passwordSha256Hex?: string(name='PasswordSha256Hex', example='b17e1e0450dac425ea318253f6f852972d69731d6c7499c001468b695b6da219'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
}

model ResetAccountPasswordResponseBody = {
  requestId?: string(name='RequestId', example='5A6A077A-577C-536E-AC13-8E715D7A34C8'),
}

model ResetAccountPasswordResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ResetAccountPasswordResponseBody(name='body'),
}

/**
 * @summary 重置实例账户密码
 *
 * @param request ResetAccountPasswordRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ResetAccountPasswordResponse
 */
async function resetAccountPasswordWithOptions(request: ResetAccountPasswordRequest, runtime: Util.RuntimeOptions): ResetAccountPasswordResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.account)) {
    query['Account'] = request.account;
  }
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.password)) {
    query['Password'] = request.password;
  }
  if (!Util.isUnset(request.passwordSha256Hex)) {
    query['PasswordSha256Hex'] = request.passwordSha256Hex;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ResetAccountPassword',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 重置实例账户密码
 *
 * @param request ResetAccountPasswordRequest
 * @return ResetAccountPasswordResponse
 */
async function resetAccountPassword(request: ResetAccountPasswordRequest): ResetAccountPasswordResponse {
  var runtime = new Util.RuntimeOptions{};
  return resetAccountPasswordWithOptions(request, runtime);
}

model RestartVirtualWareHouseRequest {
  DBClusterId?: string(name='DBClusterId', example='cc-bp1p816075e21****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  virtualWareHouseId?: string(name='VirtualWareHouseId', description='This parameter is required.', example='vw-bp1w2728d535t****'),
}

model RestartVirtualWareHouseResponseBody = {
  requestId?: string(name='RequestId', example='DE1F69AE-6F82-5227-B691-DF14AD36A460'),
}

model RestartVirtualWareHouseResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RestartVirtualWareHouseResponseBody(name='body'),
}

/**
 * @summary 重启计算组
 *
 * @param request RestartVirtualWareHouseRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RestartVirtualWareHouseResponse
 */
async function restartVirtualWareHouseWithOptions(request: RestartVirtualWareHouseRequest, runtime: Util.RuntimeOptions): RestartVirtualWareHouseResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.virtualWareHouseId)) {
    query['VirtualWareHouseId'] = request.virtualWareHouseId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RestartVirtualWareHouse',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 重启计算组
 *
 * @param request RestartVirtualWareHouseRequest
 * @return RestartVirtualWareHouseResponse
 */
async function restartVirtualWareHouse(request: RestartVirtualWareHouseRequest): RestartVirtualWareHouseResponse {
  var runtime = new Util.RuntimeOptions{};
  return restartVirtualWareHouseWithOptions(request, runtime);
}

model UpgradeClusterRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.', example='cc-8vbsom12x476u****'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
}

model UpgradeClusterResponseBody = {
  requestId?: string(name='RequestId', example='F5178C10-1407-4987-9133-DE4DC9119F75'),
}

model UpgradeClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpgradeClusterResponseBody(name='body'),
}

/**
 * @summary 实例小版本升级(内核向前兼容)
 *
 * @param request UpgradeClusterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpgradeClusterResponse
 */
async function upgradeClusterWithOptions(request: UpgradeClusterRequest, runtime: Util.RuntimeOptions): UpgradeClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpgradeCluster',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 实例小版本升级(内核向前兼容)
 *
 * @param request UpgradeClusterRequest
 * @return UpgradeClusterResponse
 */
async function upgradeCluster(request: UpgradeClusterRequest): UpgradeClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return upgradeClusterWithOptions(request, runtime);
}

model UpsertClusterSecurityIPGroupRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.', example='cc-bp108z124a8o7****'),
  groupName?: string(name='GroupName', description='This parameter is required.', example='test'),
  regionId?: string(name='RegionId', example='cn-hangzhou'),
  securityIps?: string(name='SecurityIps', description='This parameter is required.', example='192.168.xx.xx'),
}

model UpsertClusterSecurityIPGroupResponseBody = {
  requestId?: string(name='RequestId', example='A6DB2D3E-3E87-5804-9D42-9D51EC7A7D33'),
}

model UpsertClusterSecurityIPGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpsertClusterSecurityIPGroupResponseBody(name='body'),
}

/**
 * @summary 重置实例IP白名单组IP列表
 *
 * @param request UpsertClusterSecurityIPGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpsertClusterSecurityIPGroupResponse
 */
async function upsertClusterSecurityIPGroupWithOptions(request: UpsertClusterSecurityIPGroupRequest, runtime: Util.RuntimeOptions): UpsertClusterSecurityIPGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.groupName)) {
    query['GroupName'] = request.groupName;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.securityIps)) {
    query['SecurityIps'] = request.securityIps;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpsertClusterSecurityIPGroup',
    version = '2022-01-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 重置实例IP白名单组IP列表
 *
 * @param request UpsertClusterSecurityIPGroupRequest
 * @return UpsertClusterSecurityIPGroupResponse
 */
async function upsertClusterSecurityIPGroup(request: UpsertClusterSecurityIPGroupRequest): UpsertClusterSecurityIPGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return upsertClusterSecurityIPGroupWithOptions(request, runtime);
}

